load("@bazel_skylib//:bzl_library.bzl", "bzl_library")

filegroup(
    name = "all_rules",
    srcs = glob(["**/*.bzl"]),
    visibility = ["//visibility:public"],
)

filegroup(
    name = "all_files",
    testonly = True,
    srcs = glob(["**"]),
    visibility = ["//visibility:public"],
)

bzl_library(
    name = "archive",
    srcs = ["archive.bzl"],
    visibility = ["//go:__subpackages__"],
    deps = [
        "//go/private:common",
        "//go/private:mode",
        "//go/private:providers",
        "//go/private/actions:compilepkg",
        "//go/private/rules:cgo",
    ],
)

bzl_library(
    name = "binary",
    srcs = ["binary.bzl"],
    visibility = ["//go:__subpackages__"],
    deps = [
        "//go/private:common",
        "//go/private:mode",
    ],
)

bzl_library(
    name = "compilepkg",
    srcs = ["compilepkg.bzl"],
    visibility = ["//go:__subpackages__"],
    deps = [
        ":utils",
        "//go/private:mode",
        "@bazel_skylib//lib:shell",
    ],
)

bzl_library(
    name = "link",
    srcs = ["link.bzl"],
    visibility = ["//go:__subpackages__"],
    deps = [
        "//go/private:common",
        "//go/private:mode",
        "//go/private:rpath",
        "@bazel_skylib//lib:collections",
    ],
)

bzl_library(
    name = "stdlib",
    srcs = ["stdlib.bzl"],
    visibility = ["//go:__subpackages__"],
    deps = [
        ":utils",
        "//go/private:mode",
        "//go/private:providers",
        "//go/private:sdk",
    ],
)

bzl_library(
    name = "utils",
    srcs = ["utils.bzl"],
)
